package com.stormrage.entity.edu.rep;

import java.io.Serializable;

import com.stormrage.entity.edu.EduMajor;

/**
 * @author www.stormragetech.com
 * @date 2016年4月2日
 * @version 1.0.0
 */
public class EduMajorRep implements Serializable {

	// ------------------------------- Fields -------------------------------

	private static final long serialVersionUID = 5419911865597875181L;

	// ------------------------------- Fields -------------------------------

	private Integer seq;

	private Integer id;

	private Integer viewId;

	private String major;

	private Integer module; // 模块唯一性

	private String moduleStr;

	private Integer count; // 包含模块数量

	// ------------------------------- Fields -------------------------------

	public EduMajorRep() {
	}

	// ------------------------------- Fields -------------------------------

	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getViewId() {
		return viewId;
	}

	public void setViewId(Integer viewId) {
		this.viewId = viewId;
	}

	public String getMajor() {
		return major;
	}

	public void setMajor(String major) {
		this.major = major;
	}

	public Integer getModule() {
		return module;
	}

	public void setModule(Integer module) {
		this.module = module;
	}

	public String getModuleStr() {
		return moduleStr;
	}

	public void setModuleStr(String moduleStr) {
		this.moduleStr = moduleStr;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	// ------------------------------- Fields -------------------------------

	public static EduMajorRep instance(EduMajorRep arg0, Integer arg1, Integer arg2) {
		arg0.setSeq(arg1);
		arg0.setCount(arg2);
		if (arg0.getModule().equals(0))
			arg0.setModuleStr("唯一");
		if (arg0.getModule().equals(1))
			arg0.setModuleStr("不唯一");
		return arg0;
	}

	public static EduMajorRep instance(EduMajor arg0, Integer arg1, Integer arg2) {
		EduMajorRep entity = new EduMajorRep();
		entity.setSeq(arg1);
		entity.setId(arg0.getId());
		entity.setMajor(arg0.getMajor());
		if (arg0.getModule().equals(0))
			entity.setModuleStr("唯一");
		if (arg0.getModule().equals(1))
			entity.setModuleStr("不唯一");
		entity.setCount(arg2);
		return entity;
	}

	@Override
	public String toString() {
		return this.getClass() + " : id - " + id + " viewId - " + viewId + " major - " + major + " count - " + count
				+ " module - " + module;
	}

}
